package cn.iocoder.yudao.wallet.config;

import cn.iocoder.yudao.wallet.entity.Contract;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 自动配置合约参数
 */
@Slf4j
@AutoConfiguration
@ConditionalOnProperty(name="contract.address")
public class ContractConfig {

    @Bean
    @ConfigurationProperties(prefix = "contract")
    public Contract getContract(){
        Contract contract = new Contract();
        log.info("[初始化]contract=======");
        return contract;
    }

}
